package com.emep.changzhi.analyse.http.statistics;


import com.emep.changzhi.analyse.entity.outlet.SysOutletInfo;
import com.emep.changzhi.analyse.model.ResultBean;
import com.emep.changzhi.analyse.service.outlet.SysOutletInfoService;
import com.emep.changzhi.analyse.service.statistics.HourSiteSortService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("sortSite")
@Api(value="按照小时数据（6参数）排序国控站点controller",tags={"按照小时数据（6参数）排序国控站点"})
public class HourSiteSortController {

    @Autowired
    private HourSiteSortService hourSiteSortService;
    /**
     * 按照小时数据（6参数）排序国控站点
     * @return
     */
    @ApiOperation(value="按照小时数据（6参数）排序国控站点", notes="按照小时数据（6参数）排序国控站点")
    @ApiResponses({ @ApiResponse(code = 1, message = "操作成功"),
            @ApiResponse(code = 0, message = "操作失败，服务器内部异常"),
            @ApiResponse(code = 303, message = "权限不足") })
    @GetMapping(value = "sortSite")
    public ResultBean<List<SysOutletInfo>> sortSite(@RequestParam Map<String, Object> payload){
        return new ResultBean<List<SysOutletInfo>>(hourSiteSortService.sortSite(payload));
    }

}
